import http from "./http.js";

// const root = "http://192.168.3.247:8083/";
const root = "/baseUrl/";

export default root;


export function findGoodsById(id){
	var url = root+'goods/findGoodsById/'+id;
	return http.GET(url)
}

export function findGoodsListByPage(paramObj,pageInfo){
	var url = root+'goods/findGoodsListByPage?page='+pageInfo.page+"&size="+pageInfo.size;
	return http.POSTJSON(url,paramObj)
}

export function addGoodsInfo(paramObj,images){
	var url = root+'goods/addGoodsInfo';
	return http.POSTformdata(url,paramObj,images)
}

export function updateGoodsInfo(paramObj,images){
	var url = root+'goods/updateGoodsInfo';
	return http.POSTformdata(url,paramObj,images)
}

export function showImage(imagePath){
	var url = root+'goods/showImage?imagePath='+encodeURIComponent(imagePath);
	return url;
}